// 创建初始状态，并导出一个函数
const defaultState = {
    setOneTitle:"0"
}
// eslint-disable-next-line
// 导出一个函数
// eslint-disable-next-line
const titlereducer = (state=defaultState,action) => {
    let oneTitle = JSON.parse(JSON.stringify(state))
    const {type,data} = action
    switch(type){
        case "setOneTitle":
            oneTitle.setOneTitle = data;
            break
        default :
        oneTitle.setOneTitle = "0";
    }
    return oneTitle
}
export default titlereducer
